CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

# set library output path
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/target/${HT_PLATFORM}/lib/)

# mpp library
#SET(DEP_LIB_MPP_PATH ${PROJECT_SOURCE_DIR}/3rd/${PLATFORM}/${HT_PLATFORM}/mpp/lib)

# mpp
SET(DEP_INC_MPP_PATH ${PROJECT_SOURCE_DIR}/3rd/${PLATFORM}/${HT_PLATFORM}/mpp/include)

# dep lib rkaiq
#SET(DEP_LIB_RKAIQ_PATH ${PROJECT_SOURCE_DIR}/3rd/rockchip/${HT_PLATFORM}/isp/lib )

if(HT_PLATFORM MATCHES "rk3588")

# dep inc rkaiq
SET(DEP_INC_ISP_PATH 
	${PROJECT_SOURCE_DIR}/3rd/rockchip/${HT_PLATFORM}/isp/include/rkaiq
	${PROJECT_SOURCE_DIR}/3rd/rockchip/${HT_PLATFORM}/isp/include/rkaiq/algos
	${PROJECT_SOURCE_DIR}/3rd/rockchip/${HT_PLATFORM}/isp/include/rkaiq/xcore
	${PROJECT_SOURCE_DIR}/3rd/rockchip/${HT_PLATFORM}/isp/include/rkaiq/common
	${PROJECT_SOURCE_DIR}/3rd/rockchip/${HT_PLATFORM}/isp/include/rkaiq/iq_parser_v2
	${PROJECT_SOURCE_DIR}/3rd/rockchip/${HT_PLATFORM}/isp/include/rkaiq/iq_parser
	${PROJECT_SOURCE_DIR}/3rd/rockchip/${HT_PLATFORM}/isp/include/rkaiq/uAPI2)
endif()

link_directories(
        # mpp库路径
	${PROJECT_SOURCE_DIR}/3rd/${PLATFORM}/${HT_PLATFORM}/mpp/lib/
)


# add current directory
AUX_SOURCE_DIRECTORY(. src)

# add core directory
AUX_SOURCE_DIRECTORY(./core src)

# add platform common direction
AUX_SOURCE_DIRECTORY(./platform src)

# add platform direction
AUX_SOURCE_DIRECTORY(./platform/${PLATFORM} src)

# add ht platform direction
AUX_SOURCE_DIRECTORY(./platform/${PLATFORM}/${HT_PLATFORM} src)

# include path
INCLUDE_DIRECTORIES(
	# mpp include directories
	${DEP_INC_MPP_PATH}

	# isp include directories
	${DEP_INC_ISP_PATH}

	# platform common include directories
	${PROJECT_SOURCE_DIR}/src/platform/

	# core include directories
	${PROJECT_SOURCE_DIR}/src/core

	# public include directories
	${PROJECT_SOURCE_DIR}/inc
	)



ADD_LIBRARY(htmpp SHARED ${src} )

TARGET_LINK_LIBRARIES(htmpp ${DEP_LIBS})
